using System;

using Kcptun =  Letter.Net.Kcp.Library.KCP.KCP;

namespace Letter.Net.Kcp;

static class KcpExtension
{
    public static void SettingDelay(this Kcptun kcp, KcpDelay delay)
    {
        if (kcp == null)
        {
            throw new NullReferenceException(nameof(kcp));
        }

        kcp.NoDelay(delay.nodelay, delay.interval, delay.resend, delay.nc);
    }
}